/*
 * Copyright 2011 Fabian Wenzelmann
 * 
 * This file is part of Recognition-Procedures-for-Boolean-Functions.
 * 
 * Recognition-Procedures-for-Boolean-Functions is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Recognition-Procedures-for-Boolean-Functions is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Recognition-Procedures-for-Boolean-Functions.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.wenzelmf.booleanFunction.lpb.combinatorial.solver;

import de.wenzelmf.booleanFunction.util.IntegerValue;

/**
 * This exception is thrown if it is not possible to choose the coefficient a<sub>k</sub> given
 * the max and min value that are required to choose the coefficient.
 * 
 * @author Fabian Wenzelmann
 * @version 1.0
 *
 */
public class CoefficientSelectionException extends Exception
{
	
	private static final long serialVersionUID = 9045334724193925125L;
	
	/**
	 * Constructs new CoefficientSelectionException with {@code null} as detail message.
	 */
	public CoefficientSelectionException()
	{
		super();
	}

	/**
	 * Constructs a new CoefficientSelectionException with a specific detail message.
	 * 
	 * @param message The detail message of the Exception.
	 */
	public CoefficientSelectionException(String message)
	{
		super(message);
	}

	/**
	 * Constructs a new CoefficientSelectionException with a given cause.
	 * 
	 * @param cause The cause of this Exception.
	 */
	public CoefficientSelectionException(Throwable cause)
	{
		super(cause);
	}
	
	/**
	 * Constructs a new CoefficientSelectionException with the specified detail message and cause.
	 * 
	 * @param message The detail message of the Exception.
	 * @param cause The cause of this Exception.
	 */
	public CoefficientSelectionException(String message, Throwable cause)
	{
		super(message, cause);
	}

	/**
	 * Constructs a new CoefficientSelectionException given to {@link IntegerValue IntegerValues}.
	 * 
	 * Creating a Exception in this way means that it is not possible to choose
	 * the coefficient a<sub>k</sub> s.t. a &lt; a<sub>k</sub> &lt; b
	 * 
	 * @param a The first integer value.
	 * @param b The second integer value.
	 */
	public CoefficientSelectionException(IntegerValue a, IntegerValue b)
	{
		this("It is not possible to choose the coefficient 'c' s.t. " + a + " < c < " + b + ".");
	}
	
}
